package com.hmall.loadbalancer.Impl;

import com.hmall.loadbalancer.AbstractLoadBalance;
import com.hmall.remoting.dto.RpcRequest;
import java.util.Collections;
import java.util.List;

public class RandomLoadBalance extends AbstractLoadBalance {
    @Override
    protected String doSelect(List<String> serviceAddresses, RpcRequest rpcRequest) {
        Collections.shuffle(serviceAddresses);
        return serviceAddresses.get(0);
    }
}
